-
Notifications
You must be signed in to change notification settings - Fork 664
[rush-lib] Forward parameterNamesToIgnore to child processes via environment variable #5494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ronment variable Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
dmichon-msft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Address feedback.
libraries/rush-lib/src/logic/operations/test/IgnoredParametersPlugin.test.ts
Outdated
Show resolved
Hide resolved
libraries/rush-lib/src/logic/operations/IgnoredParametersPlugin.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
libraries/rush-lib/src/logic/operations/IgnoredParametersPlugin.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
libraries/rush-lib/src/logic/operations/IgnoredParametersPlugin.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
|
@copilot Run |
Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
Created change file at |
iclanton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Address feedback.
libraries/rush-lib/src/logic/operations/IgnoredParametersPlugin.ts
Outdated
Show resolved
Hide resolved
libraries/rush-lib/src/logic/operations/IgnoredParametersPlugin.ts
Outdated
Show resolved
Hide resolved
libraries/rush-lib/src/logic/operations/IgnoredParametersPlugin.ts
Outdated
Show resolved
Hide resolved
common/changes/@microsoft/rush/copilot-forward-parameter-names-ignore_2025-12-10-21-30.json
Outdated
Show resolved
Hide resolved
…tations Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
Summary
Adds
RUSHSTACK_CLI_IGNORED_PARAMETER_NAMESenvironment variable to forward theparameterNamesToIgnoreoperation setting fromrush-project.jsonto child processes during phased command execution. The environment variable name is exported as a public constant for use by consumers.Details
Implementation:
IgnoredParametersPluginthat taps thecreateEnvironmentForOperationhookparameterNamesToIgnoredirectly fromoperation.settings(raw configuration value, not CLI-affected values)RUSHSTACK_CLI_IGNORED_PARAMETER_NAMESwith JSON-stringified array when defined (following ts-command-line convention for list-type parameters)RUSHSTACK_CLI_IGNORED_PARAMETER_NAMES_ENV_VARconstant with literal type annotation for external usePhasedScriptActionalongside other standard pluginsDesign:
NodeDiagnosticDirPluginRUSHSTACK_FILE_ERROR_BASE_FOLDERconventionExample:
Given a
rush-project.jsonwith:{ "operationSettings": [ { "operationName": "build", "parameterNamesToIgnore": ["--verbose", "--production"] } ] }Child processes will receive:
Consumers can reference the environment variable name using:
How it was tested
Added unit tests verifying:
parameterNamesToIgnoreis specifiedparameterNamesToIgnoreis absentAll tests pass. No regressions in existing test suite.
Impacted documentation
None. This is an internal implementation detail for plugin authors.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.